package a06_InterfaceClass;

/**
 * @Author quan
 * @Description TODO
 * @Date 2023/1/28 23:34
 */
public class Dog extends Animal implements Swim{
    public Dog() {
    }

    public Dog(String name, int age) {
        super(name, age);
    }

    //重写父类的eat方法
    @Override
    public void eat() {
        System.out.println("狗在啃骨头");
    }
    //重写接口的swim方法
    @Override
    public void swim() {
        System.out.println("狗在狗刨");
    }
}
